Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Message-ID header in email when not set. #2915

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

slaff
Copy link
Contributor

@slaff slaff commented Nov 25, 2024

Google Mail and others started requesting Message-ID header to be present, otherwise messages are blocked/getting marked as spam.

…sent, otherwise messages are blocked/getting marked as spam.
@slaff slaff added this to the 6.0.0 milestone Nov 25, 2024
Copy link

what-the-diff bot commented Nov 25, 2024

PR Summary

  • Improvement of Header File Inclusion
    With this change, we now include the <Data/Uuid.h> file. It's a technical detail, but simply put it furnishes our system with more coding tools to work with, enhancing the overall functionality.

  • Enhancements in Mailing Process
    We've improved the method named sendMailHeaders. This method now produces and adds a unique identifier - known as a "Message-ID" - to each mail header if it isn't present. By using a generated UUID, each mail becomes unique and secure, which increases the efficiency and reliability of our mail system.

Sming/Components/Network/src/Network/SmtpClient.cpp Outdated Show resolved Hide resolved
@@ -296,6 +297,12 @@ void SmtpClient::sendMailHeaders(MailMessage* mail)
mail->stream = std::make_unique<QuotedPrintableOutputStream>(mail->stream.release());
}

if(!mail->headers.contains(F("Message-ID"))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add Message-ID to HTTP_HEADER_FIELDNAME_MAP ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://en.wikipedia.org/wiki/Message-ID is not really related or used in HTTP.

@slaff slaff changed the title Added Message-ID header in email headers when not set. Add Message-ID header in email when not set. Nov 25, 2024
@mikee47
Copy link
Contributor

mikee47 commented Nov 25, 2024

I've cleared esp32 idf cache, should fix the failed CI runs

@mikee47
Copy link
Contributor

mikee47 commented Nov 25, 2024

Guess not. Something's broken with IDF python...

@slaff slaff merged commit cae7bf3 into SmingHub:develop Nov 26, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants